// import { injectDefaultRoute } from 'el-admin-layout'
// import Layout from '@/layout'
import Redirect from '@/views/_app/redirect'
import Login from '@/views/_app/login'
import Page403 from '@/views/_app/403'
import Page404 from '@/views/_app/404'
import Page500 from '@/views/_app/500'
import routes from './module'
import { deepClone } from '@/utils'

export function getDynamicRoutes() {
  return deepClone(routes)
}

//系统自有路由
export default [
  // ...injectDefaultRoute(Layout),
  // {
  //   path: '/redirect',
  //   component: Layout,
  //   children: [
  //     {
  //       path: '*',
  //       component: Redirect
  //     }
  //   ]
  // },
  {
    path: '/redirect/*',
    component: Redirect
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/403',
    component: Page403
  },
  {
    path: '/404',
    component: Page404
  },
  {
    path: '/500',
    component: Page500
  }
]
